//
// Created by 123 on 2024/12/27.
//
#include <stdio.h>

int main081(void){
    FILE* fp;
    char ch;
    fp = fopen("rewind.txt","r");
    if(fp == NULL){
        perror("open error");
        return 1;
    }
    while ((ch = fgetc(fp)) != EOF){
        //输出控制台
        putchar(ch);
    }
    printf("\n");
    if(feof(fp)){
        printf("has success go to file ends\n");
    }

    if(ferror(fp)){
        perror("read file error\n");
    }

    fclose(fp) ;


    return 0;
}